import dayjs from 'dayjs';
const app = getApp();
import { getParams } from '@/utils/util'

Page({
    data: {
        staticPrefix: app.globalData.STATIC_PREFIX,
        type: undefined,
        status: undefined,
        value: undefined,
        date: undefined,
        time: undefined
    },
    onLoad: function (options) {
        const {
            type,
            status,
            value,
            date
        } = getParams(options.params);
        this.setData({
            type,
            status,
            value,
            date: dayjs(date).format('YYYY-MM-DD'),
            time: dayjs(date).format('HH:mm')
        })
    }
});